<?php
/**
 * UserAction
 * 和用户有关的
 * Author: huqian
 * CreateDate: 2013-10-27
 */

class UserAction extends CommonAction {
    /**
     * 个人中心-详细资料
     */
    public function getUserTips($user_id) {
        //先获取用户头像
        $User = M('user_base_info');
        $UserInfo = $User->where("user_code = $user_id")->find();
        if (empty($UserInfo['user_logo_add'])) {
            if (empty($UserInfo['api_logo_add'])) {
                $user_logo_add = __PUBLIC__ . "/Uploads/Photo/default_160.png";
            } else {
                $user_logo_add = $UserInfo['api_logo_add'];
            }
        } else {
            $user_logo_add = __PUBLIC__ . "/Uploads/Photo/" . $UserInfo['user_logo_add'];
        }
        //昵称 地区 自我介绍
        $user_nickname = $UserInfo['user_nickname'];
        $user_province = $UserInfo['user_province'];
        $user_city = $UserInfo['user_city'];
        $user_intro = $UserInfo['user_intro'];
        if(empty($user_intro) && $UserInfo['user_gender'] == 1){
            $user_intro = '他是宅男，懒得连自我介绍都不写。';
        }else if(empty($user_intro) && $UserInfo['user_gender'] == 2){
            $user_intro = '她是宅女，懒得连自我介绍都不写。';
        }
        //粉丝量
        $user_fensi_count = '100';
        //好友量
        $user_friend_count = '200';


        $User = M('user_base_info');
        $count = $User->where("user_code = $user_id")->count();
        if ($count) {

        } else {
            //用户id不存在
        }
    }


}

?>